{
  "info": {
    "name": "Langfuse",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "## Authentication\n\nAuthenticate with the API using Basic Auth, get API keys in the project settings:\n\n- username: Langfuse Public Key\n- password: Langfuse Secret Key"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "",
      "type": "string"
    },
    {
      "key": "username",
      "value": "",
      "type": "string"
    },
    {
      "key": "password",
      "value": "",
      "type": "string"
    }
  ],
  "auth": {
    "type": "basic",
    "basic": [
      {
        "key": "username",
        "value": "{{username}}",
        "type": "string"
      },
      {
        "key": "password",
        "value": "{{password}}",
        "type": "string"
      }
    ]
  },
  "item": [
    {
      "_type": "container",
      "description": null,
      "name": "Dataset Items",
      "item": [
        {
          "_type": "endpoint",
          "name": "Create",
          "request": {
            "description": "Create a dataset item",
            "url": {
              "raw": "{{baseUrl}}/api/public/dataset-items",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "dataset-items"
              ],
              "query": [],
              "variable": []
            },
            "header": [],
            "method": "POST",
            "auth": null,
            "body": {
              "mode": "raw",
              "raw": "{\n    \"datasetName\": \"example\",\n    \"input\": \"UNKNOWN\",\n    \"expectedOutput\": \"UNKNOWN\",\n    \"id\": \"example\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "_type": "endpoint",
          "name": "Get",
          "request": {
            "description": "Get a dataset item",
            "url": {
              "raw": "{{baseUrl}}/api/public/dataset-items/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "dataset-items",
                ":id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": null
                }
              ]
            },
            "header": [],
            "method": "GET",
            "auth": null,
            "body": null
          },
          "response": []
        }
      ]
    },
    {
      "_type": "container",
      "description": null,
      "name": "Dataset Run Items",
      "item": [
        {
          "_type": "endpoint",
          "name": "Create",
          "request": {
            "description": "Create a dataset run item",
            "url": {
              "raw": "{{baseUrl}}/api/public/dataset-run-items",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "dataset-run-items"
              ],
              "query": [],
              "variable": []
            },
            "header": [],
            "method": "POST",
            "auth": null,
            "body": {
              "mode": "raw",
              "raw": "{\n    \"runName\": \"example\",\n    \"datasetItemId\": \"example\",\n    \"observationId\": \"example\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "_type": "container",
      "description": null,
      "name": "Datasets",
      "item": [
        {
          "_type": "endpoint",
          "name": "Get",
          "request": {
            "description": "Get a dataset and its items",
            "url": {
              "raw": "{{baseUrl}}/api/public/datasets/:datasetName",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "datasets",
                ":datasetName"
              ],
              "query": [],
              "variable": [
                {
                  "key": "datasetName",
                  "value": "",
                  "description": null
                }
              ]
            },
            "header": [],
            "method": "GET",
            "auth": null,
            "body": null
          },
          "response": []
        },
        {
          "_type": "endpoint",
          "name": "Create",
          "request": {
            "description": "Create a dataset",
            "url": {
              "raw": "{{baseUrl}}/api/public/datasets",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "datasets"
              ],
              "query": [],
              "variable": []
            },
            "header": [],
            "method": "POST",
            "auth": null,
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"example\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "_type": "endpoint",
          "name": "Get Runs",
          "request": {
            "description": "Get a dataset run and its items",
            "url": {
              "raw": "{{baseUrl}}/api/public/datasets/:datasetName/runs/:runName",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "datasets",
                ":datasetName",
                "runs",
                ":runName"
              ],
              "query": [],
              "variable": [
                {
                  "key": "datasetName",
                  "value": "",
                  "description": null
                },
                {
                  "key": "runName",
                  "value": "",
                  "description": null
                }
              ]
            },
            "header": [],
            "method": "GET",
            "auth": null,
            "body": null
          },
          "response": []
        }
      ]
    },
    {
      "_type": "container",
      "description": null,
      "name": "Health",
      "item": [
        {
          "_type": "endpoint",
          "name": "Health",
          "request": {
            "description": "Check health of API and database",
            "url": {
              "raw": "{{baseUrl}}/api/public/health",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "health"
              ],
              "query": [],
              "variable": []
            },
            "header": [],
            "method": "GET",
            "auth": null,
            "body": null
          },
          "response": []
        }
      ]
    },
    {
      "_type": "container",
      "description": null,
      "name": "Ingestion",
      "item": [
        {
          "_type": "endpoint",
          "name": "Batch",
          "request": {
            "description": "Batched ingestion for Langfuse Tracing",
            "url": {
              "raw": "{{baseUrl}}/api/public/ingestion",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "ingestion"
              ],
              "query": [],
              "variable": []
            },
            "header": [],
            "method": "POST",
            "auth": null,
            "body": {
              "mode": "raw",
              "raw": "{\n    \"batch\": [\n        {\n            \"type\": \"trace-create\",\n            \"body\": {\n                \"id\": \"example\",\n                \"timestamp\": \"1994-11-05T13:15:30Z\",\n                \"name\": \"example\",\n                \"userId\": \"example\",\n                \"input\": \"UNKNOWN\",\n                \"output\": \"UNKNOWN\",\n                \"sessionId\": \"example\",\n                \"release\": \"example\",\n                \"version\": \"example\",\n                \"metadata\": \"UNKNOWN\",\n                \"tags\": [\n                    \"example\"\n                ],\n                \"public\": true\n            },\n            \"id\": \"example\",\n            \"timestamp\": \"example\",\n            \"metadata\": \"UNKNOWN\"\n        }\n    ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "_type": "container",
      "description": null,
      "name": "Metrics",
      "item": [
        {
          "_type": "endpoint",
          "name": "Daily",
          "request": {
            "description": "Get daily metrics of the Langfuse project",
            "url": {
              "raw": "{{baseUrl}}/api/public/metrics/daily?page=&limit=&traceName=&userId=&tags=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "metrics",
                "daily"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "",
                  "description": null
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": null
                },
                {
                  "key": "traceName",
                  "value": "",
                  "description": "Optional filter by the name of the trace"
                },
                {
                  "key": "userId",
                  "value": "",
                  "description": "Optional filter by the userId associated with the trace"
                },
                {
                  "key": "tags",
                  "value": "",
                  "description": "Optional filter for metrics where traces include all of these tags"
                }
              ],
              "variable": []
            },
            "header": [],
            "method": "GET",
            "auth": null,
            "body": null
          },
          "response": []
        }
      ]
    },
    {
      "_type": "container",
      "description": null,
      "name": "Observations",
      "item": [
        {
          "_type": "endpoint",
          "name": "Get",
          "request": {
            "description": "Get a observation",
            "url": {
              "raw": "{{baseUrl}}/api/public/observations/:observationId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "observations",
                ":observationId"
              ],
              "query": [],
              "variable": [
                {
                  "key": "observationId",
                  "value": "",
                  "description": "The unique langfuse identifier of an observation, can be an event, span or generation"
                }
              ]
            },
            "header": [],
            "method": "GET",
            "auth": null,
            "body": null
          },
          "response": []
        },
        {
          "_type": "endpoint",
          "name": "Get Many",
          "request": {
            "description": "Get a list of observations",
            "url": {
              "raw": "{{baseUrl}}/api/public/observations?page=&limit=&name=&userId=&type=&traceId=&parentObservationId=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "observations"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "",
                  "description": null
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": null
                },
                {
                  "key": "name",
                  "value": "",
                  "description": null
                },
                {
                  "key": "userId",
                  "value": "",
                  "description": null
                },
                {
                  "key": "type",
                  "value": "",
                  "description": null
                },
                {
                  "key": "traceId",
                  "value": "",
                  "description": null
                },
                {
                  "key": "parentObservationId",
                  "value": "",
                  "description": null
                }
              ],
              "variable": []
            },
            "header": [],
            "method": "GET",
            "auth": null,
            "body": null
          },
          "response": []
        }
      ]
    },
    {
      "_type": "container",
      "description": null,
      "name": "Projects",
      "item": [
        {
          "_type": "endpoint",
          "name": "Get",
          "request": {
            "description": "Get Project associated with API key",
            "url": {
              "raw": "{{baseUrl}}/api/public/projects",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "projects"
              ],
              "query": [],
              "variable": []
            },
            "header": [],
            "method": "GET",
            "auth": null,
            "body": null
          },
          "response": []
        }
      ]
    },
    {
      "_type": "container",
      "description": null,
      "name": "Prompts",
      "item": [
        {
          "_type": "endpoint",
          "name": "Get",
          "request": {
            "description": "Get a prompt",
            "url": {
              "raw": "{{baseUrl}}/api/public/prompts?name=&version=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "prompts"
              ],
              "query": [
                {
                  "key": "name",
                  "value": "",
                  "description": null
                },
                {
                  "key": "version",
                  "value": "",
                  "description": null
                }
              ],
              "variable": []
            },
            "header": [],
            "method": "GET",
            "auth": null,
            "body": null
          },
          "response": []
        },
        {
          "_type": "endpoint",
          "name": "Create",
          "request": {
            "description": "Create a prompt",
            "url": {
              "raw": "{{baseUrl}}/api/public/prompts",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "prompts"
              ],
              "query": [],
              "variable": []
            },
            "header": [],
            "method": "POST",
            "auth": null,
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"example\",\n    \"isActive\": true,\n    \"prompt\": \"example\",\n    \"config\": \"UNKNOWN\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        }
      ]
    },
    {
      "_type": "container",
      "description": null,
      "name": "Score",
      "item": [
        {
          "_type": "endpoint",
          "name": "Create",
          "request": {
            "description": "Create a score",
            "url": {
              "raw": "{{baseUrl}}/api/public/scores",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "scores"
              ],
              "query": [],
              "variable": []
            },
            "header": [],
            "method": "POST",
            "auth": null,
            "body": {
              "mode": "raw",
              "raw": "{\n    \"id\": \"example\",\n    \"traceId\": \"example\",\n    \"name\": \"example\",\n    \"value\": 0,\n    \"observationId\": \"example\",\n    \"comment\": \"example\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": []
        },
        {
          "_type": "endpoint",
          "name": "Get",
          "request": {
            "description": "Get a list of scores",
            "url": {
              "raw": "{{baseUrl}}/api/public/scores?page=&limit=&userId=&name=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "scores"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "",
                  "description": null
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": null
                },
                {
                  "key": "userId",
                  "value": "",
                  "description": null
                },
                {
                  "key": "name",
                  "value": "",
                  "description": null
                }
              ],
              "variable": []
            },
            "header": [],
            "method": "GET",
            "auth": null,
            "body": null
          },
          "response": []
        },
        {
          "_type": "endpoint",
          "name": "Get By Id",
          "request": {
            "description": "Get a score",
            "url": {
              "raw": "{{baseUrl}}/api/public/scores/:scoreId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "scores",
                ":scoreId"
              ],
              "query": [],
              "variable": [
                {
                  "key": "scoreId",
                  "value": "",
                  "description": "The unique langfuse identifier of a score"
                }
              ]
            },
            "header": [],
            "method": "GET",
            "auth": null,
            "body": null
          },
          "response": []
        },
        {
          "_type": "endpoint",
          "name": "Delete",
          "request": {
            "description": "Delete a score",
            "url": {
              "raw": "{{baseUrl}}/api/public/scores/:scoreId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "scores",
                ":scoreId"
              ],
              "query": [],
              "variable": [
                {
                  "key": "scoreId",
                  "value": "",
                  "description": "The unique langfuse identifier of a score"
                }
              ]
            },
            "header": [],
            "method": "DELETE",
            "auth": null,
            "body": null
          },
          "response": []
        }
      ]
    },
    {
      "_type": "container",
      "description": null,
      "name": "Sessions",
      "item": [
        {
          "_type": "endpoint",
          "name": "Get",
          "request": {
            "description": "Get a session",
            "url": {
              "raw": "{{baseUrl}}/api/public/sessions/:sessionId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "sessions",
                ":sessionId"
              ],
              "query": [],
              "variable": [
                {
                  "key": "sessionId",
                  "value": "",
                  "description": "The unique id of a session"
                }
              ]
            },
            "header": [],
            "method": "GET",
            "auth": null,
            "body": null
          },
          "response": []
        }
      ]
    },
    {
      "_type": "container",
      "description": null,
      "name": "Trace",
      "item": [
        {
          "_type": "endpoint",
          "name": "Get",
          "request": {
            "description": "Get a specific trace",
            "url": {
              "raw": "{{baseUrl}}/api/public/traces/:traceId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "traces",
                ":traceId"
              ],
              "query": [],
              "variable": [
                {
                  "key": "traceId",
                  "value": "",
                  "description": "The unique langfuse identifier of a trace"
                }
              ]
            },
            "header": [],
            "method": "GET",
            "auth": null,
            "body": null
          },
          "response": []
        },
        {
          "_type": "endpoint",
          "name": "List",
          "request": {
            "description": "Get list of traces",
            "url": {
              "raw": "{{baseUrl}}/api/public/traces?page=&limit=&userId=&name=&orderBy=&tags=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "public",
                "traces"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "",
                  "description": null
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": null
                },
                {
                  "key": "userId",
                  "value": "",
                  "description": null
                },
                {
                  "key": "name",
                  "value": "",
                  "description": null
                },
                {
                  "key": "orderBy",
                  "value": "",
                  "description": "Format of the string [field].[asc/desc]. Fields: id, timestamp, name, userId, release, version, public, bookmarked, sessionId. Example: timestamp.asc"
                },
                {
                  "key": "tags",
                  "value": "",
                  "description": "Only traces that include all of these tags will be returned."
                }
              ],
              "variable": []
            },
            "header": [],
            "method": "GET",
            "auth": null,
            "body": null
          },
          "response": []
        }
      ]
    }
  ]
}